public static const BUFFERING_DELAY_INTERVAL_DEFAULT:Number = 1000;
flvplayback_internal static var customComponentClassNames:Array = ["PauseButton","PlayButton","StopButton",null,null,"BackButton","ForwardButton",null,null,null,null,null,null,"PlayPauseButton","FullScreenButton","MuteButton","BufferingBar","SeekBar","VolumeBar"];
public static const MUTE_ON_BUTTON:int = 9;
public static const HIDE_CONTROLS_BUTTON:Number = 31;
public static const FULL_SCREEN_SOURCE_RECT_MIN_HEIGHT:uint = 240;
public static const NUM_CONTROLS:int = 19;
public static const VOLUME_BAR_INTERVAL_DEFAULT:Number = 250;
public static const FULL_SCREEN_SOURCE_RECT_MIN_WIDTH:uint = 320;
flvplayback_internal var cacheStageBGColor:uint;
flvplayback_internal var _bufferingDelayTimer:Timer;
public var ctrlDataDict:Dictionary;
flvplayback_internal var _skinAutoHide:Boolean;
flvplayback_internal var placeholderLeft:Number;
flvplayback_internal var _playAfterScrub:Boolean;
public var customClips:Array;
flvplayback_internal var _skinFadeStartTime:int;
flvplayback_internal var delayedControls:Array;
flvplayback_internal var _lastScrubPos:Number;
flvplayback_internal var endTabIndex:int;
flvplayback_internal var _skinAutoHideLastMotionTime:int;
flvplayback_internal var _volumeBarTimer:Timer;
flvplayback_internal var cacheFLVPlaybackScaleMode:Array;
flvplayback_internal var borderScale9Rects:Array;
flvplayback_internal var _volumeBarScrubTolerance:Number;
flvplayback_internal var fullScreenSourceRectMinAspectRatio:Number;
flvplayback_internal var _skin:String;
flvplayback_internal var fullScreenSourceRectMinHeight:uint;
flvplayback_internal var _bufferingBarHides:Boolean;
flvplayback_internal var videoRight:Number;
flvplayback_internal var placeholderRight:Number;
flvplayback_internal var cachedSoundLevel:Number;
flvplayback_internal var videoBottom:Number;
flvplayback_internal var border_mc:DisplayObject;
flvplayback_internal var _skinFadingTimer:Timer;
flvplayback_internal var borderAlpha:Number;
flvplayback_internal var borderColorTransform:ColorTransform;
flvplayback_internal var borderColor:uint;
flvplayback_internal var __visible:Boolean;
flvplayback_internal var cacheFLVPlaybackLocation:Rectangle;
flvplayback_internal var cacheFLVPlaybackIndex:int;
flvplayback_internal var _skinReady:Boolean;
flvplayback_internal var hitTarget_mc:Sprite;
flvplayback_internal var controls:Array;
flvplayback_internal var cacheFLVPlaybackAlign:Array;
flvplayback_internal var startTabIndex:int;
flvplayback_internal var _skinAutoHideMouseX:Number;
flvplayback_internal var _skinAutoHideMouseY:Number;
flvplayback_internal var layout_mc:Sprite;
flvplayback_internal var cacheSkinAutoHide:Boolean;
flvplayback_internal var cacheStageScaleMode:String;
flvplayback_internal var videoTop:Number;
flvplayback_internal var _skinFadingMaxTime:int;
flvplayback_internal var placeholderTop:Number;
flvplayback_internal var focusRect:Boolean = true;
flvplayback_internal var _lastVolumePos:Number;
flvplayback_internal var mouseCaptureCtrl:int;
flvplayback_internal var _seekBarScrubTolerance:Number;
flvplayback_internal var borderPrevRect:Rectangle;
flvplayback_internal var skinTemplate:Sprite;
flvplayback_internal var _progressPercent:Number;
flvplayback_internal var videoLeft:Number;
flvplayback_internal var _fullScreenVideoWidth:Number;
flvplayback_internal var _isMuted:Boolean;
flvplayback_internal var _skinAutoHideTimer:Timer;
flvplayback_internal var _fullScreenBgColor:uint;
flvplayback_internal var _vc:FLVPlayback;
flvplayback_internal var _bufferingOn:Boolean;
flvplayback_internal var _seekBarTimer:Timer;
flvplayback_internal var _controlsEnabled:Boolean;
flvplayback_internal var _fullScreen:Boolean;
flvplayback_internal var placeholderBottom:Number;
flvplayback_internal var fullScreenSourceRectMinWidth:uint;
flvplayback_internal var _fullScreenTakeOver:Boolean;
flvplayback_internal var skin_mc:Sprite;
flvplayback_internal var _fullScreenAccel:Boolean;
flvplayback_internal var _fullScreenVideoHeight:Number;
flvplayback_internal var skinLoadDelayCount:uint;
flvplayback_internal var _skinFadingIn:Boolean;
flvplayback_internal var _skinAutoHideMotionTimeout:int;
flvplayback_internal var borderCopy:Sprite;
flvplayback_internal var accessibilityPropertyNames:Array;
flvplayback_internal var cacheStageAlign:String;
flvplayback_internal var cacheFLVPlaybackParent:DisplayObjectContainer;
flvplayback_internal var skinLoader:Loader;
flvplayback_internal var _skinScaleMaximum:Number;
public function UIManager(param1:FLVPlayback)
{
var vc:FLVPlayback = param1;
accessibilityPropertyNames = ["Pause","Play","Stop","Seek Bar",null,"Back","Forward","Go Full Screen","Exit Full Screen","Volume Mute On","Volume Mute Off","Volume",null,null,null,null,"Buffering",null,null,null,null,null,null,null,null,null,null,null,"Captions Off","Captions On","Show Video Player Controls","Hide Video Player Controls"];
case flvplayback_internal::controls[PAUSE_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
if(!event.target.focusRect)
{
dispatchMessage(ctrlData.index);
}
focusControl = flvplayback_internal::controls[PLAY_BUTTON] as InteractiveObject;
}
break;
case flvplayback_internal::controls[PLAY_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
if(!event.target.focusRect)
{
dispatchMessage(ctrlData.index);
}
focusControl = flvplayback_internal::controls[PAUSE_BUTTON] as InteractiveObject;
}
break;
case flvplayback_internal::controls[STOP_BUTTON]:
case flvplayback_internal::controls[BACK_BUTTON]:
case flvplayback_internal::controls[FORWARD_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
event.target.tabEnabled = true;
if(!event.target.focusRect)
{
dispatchMessage(ctrlData.index);
}
focusControl = event.target as InteractiveObject;
}
break;
case flvplayback_internal::controls[MUTE_ON_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
if(!event.target.focusRect)
{
dispatchMessage(ctrlData.index);
}
focusControl = flvplayback_internal::controls[MUTE_OFF_BUTTON] as InteractiveObject;
}
break;
case flvplayback_internal::controls[MUTE_OFF_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
if(!event.target.focusRect)
{
dispatchMessage(ctrlData.index);
}
focusControl = flvplayback_internal::controls[MUTE_ON_BUTTON] as InteractiveObject;
}
break;
case flvplayback_internal::controls[FULL_SCREEN_ON_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
dispatchMessage(FULL_SCREEN_ON_BUTTON);
}
break;
case flvplayback_internal::controls[FULL_SCREEN_OFF_BUTTON]:
if(k == Keyboard.SPACE || k == Keyboard.ENTER)
{
ctrlData.state = DOWN_STATE;
dispatchMessage(FULL_SCREEN_OFF_BUTTON);
}
}
skinButtonControl(event.currentTarget);
break;
case KeyboardEvent.KEY_UP:
switch(event.target)
{
case flvplayback_internal::controls[SEEK_BAR_HANDLE]:
case flvplayback_internal::controls[VOLUME_BAR_HANDLE]:
if(k != Keyboard.TAB && (k == Keyboard.UP || k == Keyboard.DOWN || k == Keyboard.LEFT || k == Keyboard.RIGHT || k == Keyboard.PAGE_UP || k == Keyboard.PAGE_DOWN || k == Keyboard.HOME || k == Keyboard.END))
cacheFLVPlaybackLocation = new Rectangle(flvplayback_internal::_vc.registrationX,flvplayback_internal::_vc.registrationY,flvplayback_internal::_vc.registrationWidth,flvplayback_internal::_vc.registrationHeight);